/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.ufpb.halloc.dados;

/**
 *
 * @author Rennan
 */
public class TurmaDAOFileFactory extends TurmaDAOFactory{

    public static final int TXT = 1;
    public static final int BIN = 2;
    public static final int XML = 3;
    
    private static TurmaDAOFileFactory turmaDAOfactory;
    
    private TurmaDAOFileFactory(){
        //TODO
    }
    
    public static TurmaDAOFactory getInstance() {
        if(turmaDAOfactory == null)
            return new TurmaDAOFileFactory();
        else
            return turmaDAOfactory;
    }
    
    

    @Override
    public TurmaDAO getTurmaDAO(int tipo){
        
        switch (tipo){
            case TXT:
                return TurmaDAOTxt.getInstance();
            case BIN:
                return TurmaDAOBin.getInstance();
            case XML:
                return TurmaDAOXml.getInstance();
            default:
                return null;
        }
    }
    
}
